/**
 * Created with IntelliJ IDEA.
 * Description: Java 程序设计第二周作业
 */
public class Test {
    public static void main(String[ ] args) {
        int x = 0; // 定义变量x，初始值为0
        int y = 1; // 定义变量y，初始值为0
        System.out.println('a' == 97);   //判断字符a是否等于97
        System.out.println('a' >= 100);  //判断字符a是否大于100
        System.out.println(x <= y);  //判断x是否小于等于y
        System.out.println(x != y);  //判断x是不是不等于y
    }

    public static void main4(String[ ] args) {
        short s = 5;
        int i = 12;
        s += i++;
        System.out.println("s = " + s);
    }

    public static void main3(String[ ] args) {
        int a = 2;
        int b = 4;
        int x = ++a + b--;
        int y = b / a;
        System.out.println("a=" + a);
        System.out.println("b=" + b);
        System.out.println("x=" + x);
        System.out.println("y=" + y);
    }

    public static void main2(String[ ] args)
    {
        int i = 10 ;
        byte b = (byte) i ;   //变量的强制类型转换
        System.out.println(b) ;
    }

    public static void main1(String[ ] args)
    {
        //类型隐式转换
        byte a = 10;
        int b = a;
        float f = 12.5F;
        System.out.println(b);
        double d = a+b+f;
        System.out.println(d);
    }
}
